package com.education.user.mapper;

import com.education.auth.entity.BusinessDiaryVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


@Mapper
public interface BusinessDiaryDao {
   /**
    * 插入信息
    */
   //@Insert("insert into API_BUSINESS_DIARY (C_ID, C_IP, C_URL, C_PARAM_IN, C_TIME, C_TERMINAL,record,c_sys_user_id,c_model_method,c_sys_user_name) values (uuid(), #{CIp}, #{CUrl}, #{CParamIn}, NOW(), #{CTerminal},#{record},#{cSysUserId},#{cModelMethod},#{cSysUserName})")
   @Insert("insert into business_diary (id,ip, url, params, create_time,terminal,user_id,user_name,user_phone,record,method_url,method_name,ope_type,ope_type_name,ope_type_value) " +
           "values (uuid(), #{ip}, #{url}, #{params}, NOW(), #{terminal},#{userId},#{userName},#{userPhone},#{record},#{methodUrl},#{methodName},#{opeType},#{opeTypeName},#{opeTypeValue})")
   int insert(BusinessDiaryVo vo);

   List<BusinessDiaryVo> getLogList(BusinessDiaryVo businessDiaryVO);

   List<BusinessDiaryVo> diarySelect(@Param("opeType") String opeType,@Param("keyWord") String keyWord,@Param("timeStart") String timeStart,
                                     @Param("timeEnd") String timeEnd,@Param("opeTypeValue") String opeTypeValue);
}
